import { createRouter, createWebHistory } from 'vue-router'
import defaultLayout from '../Layout/defaultLayout.vue'

export const routes = [
  {
    path: '/',
    name: 'home',
    meta: { title: '首页' },
    component: defaultLayout,
    redirect: '/index',
    hidden: true,
    children: [
      {
        path: '/index',
        component: () => import('../views/home.vue'),
        meta: { title: '首页' },
      }
    ]
  },
  {
    path: '/editor',
    name: 'editor',
    component: defaultLayout,
    meta: { title: '编辑器调研' },
    children: [
      {
        path: 'onlyOffice',
        component: () => import('../views/onlyOffice.vue'),
        meta: { title: 'onlyOffice' },
      }
    ]
  }
]



const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router